package model

import "gorm.io/gorm"

type Trees struct {
	gorm.Model
	Pid  int    `gorm:"type:int(11);0" json:"pid"`
	Name string `gorm:"type:varchar(20)" json:"name" json:"name"`
}

func (t *Trees) GetFilePid(db *gorm.DB, pid int) error {
	return db.Model(t).Where("pid = ?", "0").Find(&t).Error
}
